from time import sleep
from damai.base.common import Base
from selenium.webdriver.common.by import By as by

class v5(Base):

    #位置
    login_button = (by.TAG_NAME,'button')
    home_img = (by.XPATH,'//div[@class="open-image"]')
    navigation_order = (by.XPATH,'//li[@title="订单"]')

    clean_date_orderPage = (by.XPATH,'//i[@class="el-input__icon el-range__close-icon"]')

    def __init__(self,
                 url = 'https://v5.crmeb.net/admin/login?redirect=%2Fadmin%2Findex/'
    ):
        super().__init__()
        self.open_url(url)

    def login(self):
        self.click_ele(self.login_button)

    def click_home_img(self):
        self.click_ele(self.home_img)

    def click_navigation_order(self):
        self.click_ele(self.navigation_order)




if __name__ == '__main__':
    v_ = v5()
    v_.login()
    v_.click_home_img()
    v_.click_navigation_order()
    sleep(4)
